<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>

<html>
    <head>
    <script>
    	if(document.domain.toString().indexOf("qronet.co.kr") != -1)
			document.domain = 'qronet.co.kr'; 
	</script>
    <%@ include file="/WEB-INF/views/include/common.jsp" %>
    
    
	<meta name="AUTHOR" content="QroTech Co., Ltd." />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
	<meta http-equiv="PRAGMA" content="NO-CACHE">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<link href="/resources/css/Qronet_display.css" rel="stylesheet" media="screen" />
    <title>sub4_1</title>
    </head>
    <body>
    	<div class="content" id="menu4-content1">
    			<div class="sub4_header"><img src="${imgUrl}/QronetHomeImages/sub4-2-header.png"></div>
    			<div class="sub4_1_content">
    				<div class="table_wrapper">
    					<table class="sub4_table" cellpadding="0" cellspacing="0">
    					<thead>
    						<tr>
    							<th width="70px">제목</th>
    							<th width="470px" class="left_align" style="font-weight: normal;"><c:out value="${boardView.title}" /></th>
    							<th width="40px">등록일</th>
    							<th width="80px" style="font-weight: normal;padding-right:20px;"><fmt:formatDate value="${boardView.regiTime}" pattern="yyyy-MM-dd"/></th>
    						</tr>
    					</thead>
    					<tbody>
    						<tr>
    							<td colspan="4">
    								<div class="sub4_para" style="height:200px;">
    									<c:out value="${boardView.contents}" escapeXml="No"/>    									
    								</div>
    							</td>
    						</tr>
    						<tr>
    							<td colspan="4" ><div class="td_bg_4_2_2 left_align"><span class="next_page"> 첨부 파일</span>
    							<span class="left_align" style="font-weight: normal;"><c:out value="${boardView.attachement}" /></span>
    							<span style="float:right; margin-right:1em;"><a onClick="fileDownload()" style="color:black;" target="_new"> 다운로드 </a></span>
    							</div>
    							</td>
    						</tr>
    					</tbody>
    				</table>
    				<div class="button"><a onClick="gotoList()"><img src="${imgUrl}/QronetHomeImages/sub4_1_2_button.png"></a></div>
    			</div>
    		</div>	
    		<div class="sub4_footer">COPYRIGHT(C) QROTECH ALL RIGHTS RESERVED.</div>
    	</div><!--sub4-1 end-->
    	<form name="theForm" id="theForm" action="" method="post" style="display:none;">
    		<input type="hidden" name="textID" id="textID" value="<c:out value="${boardView.textID}" />">
    		<input type="hidden" name="attachement" id="attachement" value="<c:out value="${boardView.attachement}" />">
    	</form>
    	<script language="javascript">
    		function gotoList() {
    			location.href= "/homepage/archivesListMain";
    		}
    		function fileDownload() {
    			var param = "fileName="+$("#attachement").val()+"&textID="+$("#textID").val();
    			location.href= "/homepage/download?"+param;
    		}
    	</script>
    </body>
</html>